﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Experimental.Rendering.ShaderWarmup
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine.Experimental.Rendering
{
  /// <summary>
  ///   <para>Prewarms shaders in a way that is supported by all graphics APIs.</para>
  /// </summary>
  [NativeHeader("Runtime/Graphics/ShaderScriptBindings.h")]
  public static class ShaderWarmup
  {
    /// <summary>
    ///   <para>Prewarms all shader variants for a given Shader, using a given rendering configuration.</para>
    /// </summary>
    /// <param name="shader"></param>
    /// <param name="setup"></param>
    [FreeFunction(Name = "ShaderWarmupScripting::WarmupShader")]
    public static void WarmupShader(Shader shader, ShaderWarmupSetup setup)
    {
      ShaderWarmup.WarmupShader_Injected(shader, ref setup);
    }

    /// <summary>
    ///   <para>Prewarms the shader variants for a given Shader that are in a given ShaderVariantCollection, using a given rendering configuration.</para>
    /// </summary>
    /// <param name="collection"></param>
    /// <param name="shader"></param>
    /// <param name="setup"></param>
    [FreeFunction(Name = "ShaderWarmupScripting::WarmupShaderFromCollection")]
    public static void WarmupShaderFromCollection(
      ShaderVariantCollection collection,
      Shader shader,
      ShaderWarmupSetup setup)
    {
      ShaderWarmup.WarmupShaderFromCollection_Injected(collection, shader, ref setup);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void WarmupShader_Injected(Shader shader, ref ShaderWarmupSetup setup);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void WarmupShaderFromCollection_Injected(
      ShaderVariantCollection collection,
      Shader shader,
      ref ShaderWarmupSetup setup);
  }
}
